package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerRealGoodsOrderInfo implements IQLResponse
{
    /// <summary>
    /// 实物订单编号
    /// </summary>
    public long OrderId;

    /// <summary>
    /// 用户Id
    /// </summary>
    public long UserId;

    /// <summary>
    /// 用户昵称
    /// </summary>
    public String Nickname;

    /// <summary>
    /// 玩家的vip等级
    /// </summary>
    public long VipLevel;

    /// <summary>
    /// 玩家总充值，单位分
    /// </summary>
    public long TotalRecharge;

    /// <summary>
    /// 实物商品Id
    /// </summary>
    public long GoodsId;

    /// <summary>
    /// 实物商品名称
    /// </summary>
    public String GoodsName;

    /// <summary>
    /// 真实姓名
    /// </summary>
    public String RealName;

    /// <summary>
    /// 电话
    /// </summary>
    public String Phone;

    /// <summary>
    /// 地址
    /// </summary>
    public String Address;

    /// <summary>
    /// 0未发货 1已发货 2拒绝发货
    /// </summary>
    public long State;

    /// <summary>
    /// 兑换时间
    /// </summary>
    public String CreateTime;

    /// <summary>
    /// 发货时间
    /// </summary>
    public String ProcessTime;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("order_id"))
            OrderId = t.getLong("order_id");
        if (t.has("user_id"))
            UserId = t.getLong("user_id");
        if (t.has("nickname"))
            Nickname = t.getString("nickname");
        if (t.has("vip_level"))
            VipLevel = t.getLong("vip_level");
        if (t.has("total_recharge"))
            TotalRecharge = t.getLong("total_recharge");
        if (t.has("goods_id"))
            GoodsId = t.getLong("goods_id");
        if (t.has("goods_name"))
            GoodsName = t.getString("goods_name");
        if (t.has("real_name"))
            RealName = t.getString("real_name");
        if (t.has("phone"))
            Phone = t.getString("phone");
        if (t.has("address"))
            Address = t.getString("address");
        if (t.has("state"))
            State = t.getLong("state");
        if (t.has("create_time"))
            CreateTime = t.getString("create_time");
        if (t.has("process_time"))
            ProcessTime = t.getString("process_time");
    }
}
